using System;
using System.Collections.Generic;
using System.Text;

namespace NestBox.Inventory
{
    class Helpers
    {
        public const string CurrentDirectoryKey = "CurrentDirectory";


        /// <summary>
        /// Collapse a string[] into a single string, minus the first element
        /// </summary>
        /// <param name="cmdLine"></param>
        /// <returns></returns>
        public static string combineCmdArg(string[] cmdLine)
        {
            return combineString(cmdLine, 1);
        }

        /// <summary>
        /// Collapse a string[] starting at the given index
        /// </summary>
        /// <param name="parts"></param>
        /// <param name="start"></param>
        /// <returns></returns>
        public static string combineString(string[] parts, int start)
        {
            string rtn = "";
            for (int i = start; i < parts.Length; i++)
            {
                rtn += " " + parts[i];
            }
            return rtn.Trim();
        }

    }
}
